<template>
  <div class="alert-container">
    <seamless-scroller :data-list="alerts" container-width="430px" container-height="190px" :scroll-duration="1" @itemClick="itemClick">
      <template #item="{ item, index }">
        <div class="custom-item">
          {{ item.message }}
        </div>
      </template>
    </seamless-scroller>
  </div>
</template>

<script>
import SeamlessScroller from "@/components/SeamlessScroller.vue";

export default {
  components: {SeamlessScroller},
  data() {
    return {
      alerts: [
        { message: "Alert 1" },
        { message: "Alert 2" },
        { message: "Alert 3" },
        { message: "Alert 4" },
        { message: "Alert 5" },
        { message: "Alert 6" },
      ]
    };
  },
  methods: {
    itemClick(item, index) {
      console.log(item, index)
    }
  }
};
</script>

<style scoped>
.alert-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
}
</style>